package cn.venny.doudian.config;

import cn.venny.doudian.DefaultDoudianClient;
import cn.venny.doudian.DoudianClient;
import cn.venny.doudian.properties.DouDianProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author Vick C
 * @date 2021/4/8
 */
@Configuration
public class DouDianConfig {


    /**
     * 抖店client
     * @param config 抖店配置信息
     * @return 抖店client
     */
    @Bean
    public DoudianClient doudianClient(DouDianProperties config) {
        return new DefaultDoudianClient(config.getServerUrl(), config.getAppKey(), config.getAppSecret());
    }

}
